SELECT col7 , col1 , LAG(col1) OVER(PARTITION BY col7 ORDER BY col1) LAG_col1 FROM "allTypsUniq.parquet"